import QtQuick 2.13
import QtQuick.Window 2.13
import QtQuick.Controls 2.13
import Qt.labs.platform 1.1


SystemTrayIcon {
    function test(){
     console.log("test SystemTrayIcon")
        messageClicked()
        showMessage("Message title", "Something important came up. Click this to know more.")
    }

    visible: true
    iconSource: "qrc:/other/icon/xiaoma.png"
    
    menu: Menu {
        MenuItem {
            text: qsTr("Quit")
            //            onActivated: Qt.quit()
            onTriggered: Qt.quit()
        }
        MenuItem{
            text: qsTr("Test")
            onTriggered: {
                console.log("Test")
            }
        }
    }
    onMessageClicked: console.log("Message clicked")
    Component.onCompleted: showMessage("Message title", "Something important came up. Click this to know more.")


}

